﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Entities;

namespace WebUI.Models
{
    public abstract class BaseModel
    {
        public virtual IEnumerable<SelectListItem> Spans
        {
            get
            {
                return Enum
                    .GetValues(typeof(TimeSpans))
                    .Cast<TimeSpans>()
                    .Select(bs => 
                    new SelectListItem
                    {
                        Value = ((int)bs).ToString(),
                        Text = bs.ToString()
                    });
            }
        }
    }
}